package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.AssetsDistributionMapper;
import com.ly.heart.service.IAssetsDistributionService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.AssetsDistributionEntity;

import javax.annotation.Resource;


/**
 * 资产卡片分配信息Service业务层处理
 *
 * @author cxl
 * @date 2024-09-03
 */
@Service
public class AssetsDistributionServiceImpl extends ServiceImpl<AssetsDistributionMapper,AssetsDistributionEntity> implements IAssetsDistributionService {

    @Resource
    private AssetsDistributionMapper assetsDistributionMapper;

    /**
     * 查询资产卡片分配信息
     *
     * @param id 资产卡片分配信息ID
     * @return 资产卡片分配信息
     */
    @Override
    public AssetsDistributionEntity selectAssetsDistributionEntityById(String id)
    {
        return assetsDistributionMapper.selectAssetsDistributionEntityById(id);
    }

    /**
     * 查询资产卡片分配信息列表
     *
     * @param assetsDistributionEntity 资产卡片分配信息
     * @return 资产卡片分配信息
     */
    @Override
    public List<AssetsDistributionEntity> selectAssetsDistributionEntityList(AssetsDistributionEntity assetsDistributionEntity)
    {
        return assetsDistributionMapper.selectAssetsDistributionEntityList(assetsDistributionEntity);
    }

    /**
     * 新增资产卡片分配信息
     *
     * @param assetsDistributionEntity 资产卡片分配信息
     * @return 结果
     */
    @Override
    public int insertAssetsDistributionEntity(AssetsDistributionEntity assetsDistributionEntity)
    {
        assetsDistributionEntity.setCreateTime(DateUtils.getNowDate());
        return assetsDistributionMapper.insertAssetsDistributionEntity(assetsDistributionEntity);
    }

    /**
     * 修改资产卡片分配信息
     *
     * @param assetsDistributionEntity 资产卡片分配信息
     * @return 结果
     */
    @Override
    public int updateAssetsDistributionEntity(AssetsDistributionEntity assetsDistributionEntity)
    {
        assetsDistributionEntity.setUpdateTime(DateUtils.getNowDate());
        return assetsDistributionMapper.updateAssetsDistributionEntity(assetsDistributionEntity);
    }

    /**
     * 批量删除资产卡片分配信息
     *
     * @param ids 需要删除的资产卡片分配信息ID
     * @return 结果
     */
    @Override
    public int deleteAssetsDistributionEntityByIds(String[] ids)
    {
        return assetsDistributionMapper.deleteAssetsDistributionEntityByIds(ids);
    }

    /**
     * 删除资产卡片分配信息信息
     *
     * @param id 资产卡片分配信息ID
     * @return 结果
     */
    @Override
    public int deleteAssetsDistributionEntityById(String id)
    {
        return assetsDistributionMapper.deleteAssetsDistributionEntityById(id);
    }
}
